#include <stdio.h>

void characters(const char *input, int *uppercase,int *lowercase,int *space,int *digit,int *other) {
    while (*input != '\0') {
        if (*input >= 'A' && *input <= 'Z') {
            (*uppercase)++;
        } else if (*input >= 'a' && *input <= 'z') {
            (*lowercase)++;
        } else if (*input == ' ') {x
            (*space)++;
        } else if (*input >= '0' && *input <= '9') {
            (*digit)++;
        } else {
            (*other)++;
        }
        input++;
    }
}

int main() {
    char input[100];
    printf("请输入一行文字：");
    fgets(input, sizeof(input), stdin);
    int uppercase= 0;
    int lowercase= 0;
    int space= 0;
    int digit= 0;
    int other= 0;

    characters(input, &uppercase, &lowercase, &space, &digit, &other);

    printf("大写字母数量：%d\n", uppercase);
    printf("小写字母数量：%d\n", lowercase);
    printf("空格数量：%d\n", space);
    printf("数字数量：%d\n", digit);
    printf("其他字符数量：%d\n", other);

    return 0;
}